“import /folder1/folder2/filename.sol”
2.5.7.4 Contract
We also have one or more contracts in the body.
Constructor: In each contract, there can be an optional constructor.
Also, each contract can have different types of variables, events, and
functions within them.
Comments: We can add single line comments, like the following:
// This is a single-line comment
We can also add multiline comments, as the following:
/*
This is a multiline comment
I can describe the entire business logic of the function here
*/
We can also write a double asterisk block before every contract and
every function to add additional data on the input parameters, and
return, as shown as follows:
/**
* @title Calculator
* @dev Implements addition of two numbers
*/
2.5.7.5 Libraries
A library is a utility or reusable piece of code that can be called from
a contract many times as per requirement. A library can have
variables or functions just like a Contract and can be called from a
Contract as a utility.
2.5.7.6 Interfaces